<?php
require './API/qqConnectAPI.php';
//1.回调地址获取code
echo $_GET['code'];
//2.通过回调方法获取access_token
$oauth = new Oauth();
$access_token = $oauth->qq_callback();
echo '<br />';
echo $access_token;
//3.获取用户openid,是用户唯一标识
//可以通过openid获取用户信息
$openID = $oauth->get_openid();
echo '<br />';
echo $openID;
//4.通过opendID和access_token获取用户基本信息
$qc = new QC($access_token,$openID);
$arrInfo = $qc->get_user_info();
echo '<hr>';
echo '<pre>';
var_dump($arrInfo);